package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmsOrderCostMapper;
import com.ruoyi.system.domain.HmsOrderCost;
import com.ruoyi.system.service.IHmsOrderCostService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单费用信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-16
 */
@Service
public class HmsOrderCostServiceImpl implements IHmsOrderCostService 
{
    @Autowired
    private HmsOrderCostMapper hmsOrderCostMapper;

    /**
     * 查询订单费用信息
     * 
     * @param costId 订单费用信息主键
     * @return 订单费用信息
     */
    @Override
    public HmsOrderCost selectHmsOrderCostByCostId(Long costId)
    {
        return hmsOrderCostMapper.selectHmsOrderCostByCostId(costId);
    }

    /**
     * 查询订单费用信息列表
     * 
     * @param hmsOrderCost 订单费用信息
     * @return 订单费用信息
     */
    @Override
    public List<HmsOrderCost> selectHmsOrderCostList(HmsOrderCost hmsOrderCost)
    {
        return hmsOrderCostMapper.selectHmsOrderCostList(hmsOrderCost);
    }

    /**
     * 新增订单费用信息
     * 
     * @param hmsOrderCost 订单费用信息
     * @return 结果
     */
    @Override
    public int insertHmsOrderCost(HmsOrderCost hmsOrderCost)
    {
        return hmsOrderCostMapper.insertHmsOrderCost(hmsOrderCost);
    }

    /**
     * 修改订单费用信息
     * 
     * @param hmsOrderCost 订单费用信息
     * @return 结果
     */
    @Override
    public int updateHmsOrderCost(HmsOrderCost hmsOrderCost)
    {
        return hmsOrderCostMapper.updateHmsOrderCost(hmsOrderCost);
    }

    /**
     * 批量删除订单费用信息
     * 
     * @param costIds 需要删除的订单费用信息主键
     * @return 结果
     */
    @Override
    public int deleteHmsOrderCostByCostIds(String costIds)
    {
        return hmsOrderCostMapper.deleteHmsOrderCostByCostIds(Convert.toStrArray(costIds));
    }

    /**
     * 删除订单费用信息信息
     * 
     * @param costId 订单费用信息主键
     * @return 结果
     */
    @Override
    public int deleteHmsOrderCostByCostId(Long costId)
    {
        return hmsOrderCostMapper.deleteHmsOrderCostByCostId(costId);
    }
}
